package com.jkdz.spyke.flexUI.helpers {
	import flash.display.Bitmap;
	import flash.display.Loader;
	import flash.events.Event;
	import flash.net.URLRequest;
	
	public class BitmapDataLoader {
		
		public static function load(url:String, onLoad:Function):void {
			var l:Loader = new Loader();
			l.load(new URLRequest(url));
			l.contentLoaderInfo.addEventListener(Event.INIT, function(e:Event):void {
				var b:Bitmap = (Bitmap)(l.content);
				onLoad(b.bitmapData);
			});
		}
	}
}